<template>
    理财名称<input v-model="info.name" type="text" />
    理财总金额<input v-model="info.mones" type="text" />
    <input type="button" value="查询" @click="showw"/>
<table class="table-bordered" border="1">
<thead>
    <tr>
        <th>理财名称</th>
        <th>理财总金额</th>
        <th>已投金额</th>      
        <th>理财人数</th>
        <th>剩余金额</th>
        <th>操作</th>
    </tr>
</thead>
<tbody>
    <tr v-for="item in types"::key="item.T_TnecestId">
        <td>{{item.T_TnecestName}}</td>
        <td>{{item.T_TnecestBudget}}</td>
        <td>{{  item.T_Tnecestserid}}</td>      
        <td>{{item.T_TnecestNumber}}</td>
        <td>{{item.T_TnecestEnd}}</td>
        <td>操作</td>
    </tr>
</tbody>
</table>
</template>
<script setup lang="ts">
import { ref,onMounted } from 'vue';
import axios from 'axios';
onMounted(()=>{
    showw()
})

const info=ref({
    name:"",
    mones:0,
})
const types=ref([{
    T_TnecestId:0,
    T_TnecestName:"",
    T_TnecestBudget:0,
    T_TnecestEnd:0,
    T_Tnecestserid:0,
    T_TnecestNumber:0
}])
const showw=()=>{
    axios({
        url:"https://localhost:44366/api/Invest/TnecestShow",
        params:{
            name:info.value.name,
            mones:info.value.mones,
        },
        method:"get"
    })
    .then((res)=>{
        types.value=res.data;
        
    })

    .catch((err)=>{
        console.log(err);
    })
}


</script>

